<!DOCTYPE html>
<html xmlns:th="https://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div th:object="${student}">
    <p th:text="*{id}"></p>
    <p th:text="*{name}"></p>
    <p th:text="*{age}"></p>
</div>
<input th:value="${student.name}">
<div>
    <div th:if="${student.id==2}">测试</div>
</div>
<div th:switch="${student.id}">
    <p th:case="0">可见</p>
    <p th:case="1">隐藏</p>
    <p th:case="*">其他</p>

</div>
<ul>
    <li th:each="stu : ${list}">
        <span th:text="${stu.id}"></span>
        <span th:text="${stu.name}"></span>
        <span th:text="${stu.age}"></span>
    </li>
</ul>
</body>
</html>
<script th:inline="javascript">
    const student=[[${student}]]
    console.log(student)
</script>

